package net.citrite.android;

import com.android.ide.common.rendering.api.LayoutLog;

import java.util.logging.Logger;


public class LayoutLogWrapper extends LayoutLog {
    private Logger logger;
    public LayoutLogWrapper(Logger logger) {
        this.logger = logger;
    }

    @Override
    public void warning(String tag, String message, Object data) {
        logger.warning(message);
    }

    @Override
    public void error(String tag, String message, Object data) {
        logger.severe(message);
    }

    @Override
    public void error(String tag, String message, Throwable throwable, Object data) {
        if (throwable != null) {
            logger.severe(throwable.toString());
        }
        logger.severe(message);
    }
}
